home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
FILEVIEW.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
68 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME FILEVIEW.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NBT1.INC"
COLOR 7, 0, 0
'┌─────────────────────────────────────────────────────────────────────────────────────────────
'│ FileView ( Row?, Col?, Rows?, Cols?, FileName$ )
'├─────────────────────────────────────────────────────────────────────────────────────────────
'│ I like to give my users the opportunity to print reports to either a file or to the printer.
'│ This gives them the chance to have a look at what is going to be printed and make changes if
'│ need be. Also, in this day and age an ASCii file goes over the modem as data and/or fax too.
'│ FileView is the down and dirty little routine I use to let them preview the file. It is easy
'│ to use but you must prepare the screen BEFORE calling it as it does NOTHING but print what it
'│ finds in whatever color is already there!
'├─────────────────────────────────────────────────────────────────────────────────────────
'│ <HOME> top of file < UP > 1 line up <PgUp> Rows? - 1 up
'│ <LEFT> 1 column left <RIGHT> 1 column right
'│ <S/TAB> 5 columns left <TAB> 5 columns right
'│ <END> end of file <DOWN> 1 line down <PgDn> Rows? - 1 down
'│
'│ <CTRL><LEFT> column 1 <CTRL><RIGHT> rightmost column
'│ <ESC> bail out
'└──────────────────────────────────────────────────────────────────────────────────────────────
Row? = 3
Col? = 6
Rows? = 21
Cols? = 70
FileName$ = "DMO\FILEVIEW.DMO"
CLS
COLOR 15, 1
T$ = "{ ?" + FileName$ + " 1}"
MakeTBox Row?-1, Col?-1, Rows?+2, Cols?+2, 1, 49, 0, 0, 7, T$
TBoxCOLOR Row?, Col?, Rows?, Cols?, 48
DisplayFile Row?, Col?, Rows?, Cols?, FileName$
COLOR 7, 0, 0
CLS
' ──────────────────────────────────────────────────────────────────────────
FUNCTION fGetKey% () LOCAL PUBLIC
WHILE NOT INSTAT : WEND
FUNCTION = CVI( INKEY$ + CHR$(0) )
END FUNCTION